Skip to content

[CI] Test makefs-related header changes #1726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

jrtc27
Copy link
Contributor

@jrtc27 jrtc27 commented Jun 16, 2025

Do not merge, for cross-building testing only.

jrtc27 added 8 commits June 16, 2025 20:50
Summary:
This header uses various types that come from here regardless of whether
_KERNEL is defined, so unconditionally include it rather than relying on
other headers implicitly including it for when _KERNEL is not defined.

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D50884
Summary:
This allows struct iso_mnt to be defined for userspace without resorting
to the gross hack of defining _KERNEL.

Reviewers: imp, kib, markj

Differential Revision: https://reviews.freebsd.org/D50717
Summary:
Whilst these aren't used by makefs, they do little harm existing once
the needed headers are included, and having structs change layout based
on defines like this can be fraught. This will be particularly true once
this code is exposed by defines other than _KERNEL and MAKEFS, as any
consumer will be able to opt into exposing this kernel type and all the
definitions should match.

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D50885
Summary:
This lets other bits of userspace expose these various definitions too.
The function prototypes surely won't be useful in other contexts, but
the various types are, and it's not worth hiding the prototypes unless
they end up causing issues, but so long as they aren't called they
shouldn't be a problem.

Note the MAKEFS define continues to exist, but only for use in
newfs_msdos, as those sources are reused by makefs with some changed
behaviour.

Test Plan: imp, kib, markj

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D50718
Summary:
Defining _KERNEL is a historical hack that can often break due to the
environment not actually being that of a kernel build. Now that we have
other targeted macros we can define instead that don't have far-reaching
implications like _KERNEL we can drop this.

Reviewers: imp, kib, markj

Differential Revision: https://reviews.freebsd.org/D50719
…erspace

Summary:
Note that ZNODE_OS_FIELDS needs to change to using struct vnode over
vnode_t (matching struct zfsvfs rather than vnode_t) since vnode_t is
only defined in the kernel SPL, not the userspace SPL (libspl).

Reviewers: imp, kib, markj, mm

Subscribers: delphij

Differential Revision: https://reviews.freebsd.org/D50720
Summary:
Now that we have a _WANT_ZNODE we can use that instead of defining
_KERNEL, and we're able to move the code back into zfs.c using a real
znode_t pointer.

Reviewers: imp, kib, markj, mm

Subscribers: delphij

Differential Revision: https://reviews.freebsd.org/D50721
@jrtc27 jrtc27 force-pushed the libprocstat-no-_KERNEL branch from 65d769b to caa2603 Compare June 16, 2025 20:54
@jrtc27 jrtc27 requested a review from bsdimp as a code owner June 16, 2025 20:54
@jrtc27 jrtc27 force-pushed the libprocstat-no-_KERNEL branch from caa2603 to e44c721 Compare June 16, 2025 21:10
These will be needed by future changes to continue to allow building
makefs as a bootstrap tool on Linux and macOS. This also requires
defining __sbintime_t in our cross-build sys/_types.
@jrtc27 jrtc27 force-pushed the libprocstat-no-_KERNEL branch from e44c721 to 5927234 Compare June 16, 2025 21:16
@jrtc27
Copy link
Contributor Author

jrtc27 commented Jun 16, 2025

64e0b2e...66cc116

@jrtc27 jrtc27 closed this Jun 16, 2025
@jrtc27 jrtc27 deleted the libprocstat-no-_KERNEL branch June 16, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant